package top.zsyle.org.dto;

import lombok.Builder;
import lombok.Data;
import org.springframework.beans.BeanUtils;
import top.zsyle.org.domain.Employee;
import top.zsyle.org.domain.Shop;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
public class ShopSettlementAgainDto {
    //NotNull 基本数据类型的包装类，eg:Integer
    //NotEmpty 判断集和是否为空
    //NotBlank 判断字符串
    @NotNull(message = "id不能为空")
    private Long id;
    @NotBlank(message = "店铺名不能为空！")
    private String name;
    @NotBlank(message = "店铺电话不能为空！")
    private String tel;
    @NotBlank(message = "店铺地址不能为空！")
    private String address;

    private String logo;

    public Shop getShop(){
        return Shop.builder()
                .name(this.name)
                .tel(this.tel)
                .address(this.address)
                .logo(this.logo)
                .build();
    }
}
